class KeywordprogramsController < ApplicationController
  def index
    @keywordprograms = Keywordprogram.all
  end

  def show
    @keywordprogram = Keywordprogram.find(params[:id])
  end

  def new
    @keywordprogram = Keywordprogram.new
  end

  def create
    @keywordprogram = Keywordprogram.new(params[:keywordprogram])
    if @keywordprogram.save
      redirect_to @keywordprogram, :notice => "Successfully created keywordprogram."
    else
      render :action => 'new'
    end
  end

  def edit
    @keywordprogram = Keywordprogram.find(params[:id])
  end

  def update
    @keywordprogram = Keywordprogram.find(params[:id])
    if @keywordprogram.update_attributes(params[:keywordprogram])
      redirect_to @keywordprogram, :notice  => "Successfully updated keywordprogram."
    else
      render :action => 'edit'
    end
  end

  def destroy
    @keywordprogram = Keywordprogram.find(params[:id])
    @keywordprogram.destroy
    redirect_to keywordprograms_url, :notice => "Successfully destroyed keywordprogram."
  end
end
